package com.internetCafes.spms.web.sys.common;

/**
 * 政策信息枚举类
 */
public class PolicyCost {

    public enum ImportanceCode {

        GENERAL("General", "普通"),
        IMPORTANT("Important", "重要"),
        UNIMPORTANT("UnImportant", "不重要");

        /**
         * 重要性code
         */
        private String code;

        /**
         * 重要性具体表达
         */
        private String value;

        ImportanceCode(String code, String value) {
            this.code = code;
            this.value = value;
        }

        public String getCode() {
            return code;
        }

        public String getValue() {
            return value;
        }

        public static String getValueByCode(String code) {
            for (ImportanceCode importanceCode : values()) {
                if (importanceCode.getCode().equals(code)) {
                    return importanceCode.getValue();
                }
            }
            return null;
        }
    }
}
